#ifndef VEGETABLES_H
#define VEGETABLES_H
/**
 * vegetables.h
 * This holds the different values for the
 * vegetables type nutrition_fields in coolinary.h
 */

#include "table.h"
#include "coolinary.h"

#define MAX 101
/**
 * Fruit descriptions
 */
struct nutrition_fields f_asp = {
    	.calories = 20,
	.protein = 2,
	.sugar = 2,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 10,
	.vitamin_c = 15
};

cooltype asparagus = {
	.name = "asparagus",
	.type = "vegetable",
	.nutrition = 0,
	.nutrition_values = &f_asp,
	.quantity = 1,
	.time = 0

};


struct nutrition_fields f_broccoli = {
    	.calories = 45,
	.protein = 4,
	.sugar = 2,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 6,
	.vitamin_c = 220
};

cooltype broccoli = {
	.name = "broccoli",
	.type = "vegetable",
	.nutrition = 0,
	.nutrition_values = &f_broccoli,
	.quantity = 1,
	.time = 0

};

struct nutrition_fields f_carrot = {
    	.calories = 30,
	.protein = 2,
	.sugar = 5,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 110,
	.vitamin_c = 10
};

cooltype carrot = {
	.name = "carrot",
	.type = "vegetable",
	.nutrition = 0,
	.nutrition_values = &f_carrot,
	.quantity = 1,
	.time = 0

};

struct nutrition_fields f_cauliflower = {
    	.calories = 25,
	.protein = 2,
	.sugar = 2,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 0,
	.vitamin_c = 100
};

cooltype cauliflower = {
	.name = "cauliflower",
	.type = "vegetable",
	.nutrition = 0,
	.nutrition_values = &f_cauliflower,
	.quantity = 1,
	.time = 0

};

struct nutrition_fields f_celery = {
    	.calories = 15,
	.protein = 0,
	.sugar = 2,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 10,
	.vitamin_c = 15
};

cooltype celery = {
	.name = "celery",
	.type = "vegetable",
	.nutrition = 0,
	.nutrition_values = &f_celery,
	.quantity = 1,
	.time = 0

};

struct nutrition_fields f_cucumber = {
    	.calories = 10,
	.protein = 1,
	.sugar = 1,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 4,
	.vitamin_c = 10
};

cooltype cucumber = {
	.name = "cucumber",
	.type = "vegetable",
	.nutrition = 0,
	.nutrition_values = &f_cucumber,
	.quantity = 1,
	.time = 0

};

struct nutrition_fields f_mush = {
    	.calories = 20,
	.protein = 3,
	.sugar = 0,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 0,
	.vitamin_c = 2
};

cooltype mushroom = {
	.name = "mushroom",
	.type = "vegetable",
	.nutrition = 0,
	.nutrition_values = &f_mush,
	.quantity = 1,
	.time = 0

};

struct nutrition_fields f_onion = {
    	.calories = 45,
	.protein = 1,
	.sugar = 9,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 0,
	.vitamin_c = 20
};

cooltype onion = {
	.name = "onion",
	.type = "vegetable",
	.nutrition = 0,
	.nutrition_values = &f_onion,
	.quantity = 1,
	.time = 0

};

struct nutrition_fields f_potato = {
    	.calories = 110,
	.protein = 3,
	.sugar = 1,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 0,
	.vitamin_c = 45
};

cooltype potato = {
	.name = "potato",
	.type = "vegetable",
	.nutrition = 0,
	.nutrition_values = &f_potato,
	.quantity = 1,
	.time = 0

};

struct nutrition_fields f_tomato = {
    	.calories = 25,
	.protein = 1,
	.sugar = 3,
	.fat = 0,
	.cholesterol = 0,
	.vitamin_a = 20,
	.vitamin_c = 40
};

cooltype tomato = {
	.name = "tomato",
	.type = "vegetable",
	.nutrition = 0,
	.nutrition_values = &f_tomato,
	.quantity = 1,
	.time = 0

};

void init_veg_table(table v_table){
	v_table = table_init(MAX);
	int varsz = sizeof(cooltype);
	table_insert(v_table,"vegetable", FGROUP, &asparagus, varsz);
	table_insert(v_table,"vegetable", FGROUP, &broccoli, varsz);
	table_insert(v_table,"vegetable", FGROUP, &carrot, varsz);
	table_insert(v_table,"vegetable", FGROUP, &cauliflower, varsz);
	table_insert(v_table,"vegetable", FGROUP, &celery, varsz);
	table_insert(v_table,"vegetable", FGROUP, &cucumber, varsz);
	table_insert(v_table,"vegetable", FGROUP, &mushroom, varsz);
	table_insert(v_table,"vegetable", FGROUP, &onion, varsz);
	table_insert(v_table,"vegetable", FGROUP, &potato, varsz);
	table_insert(v_table,"vegetable", FGROUP, &tomato, varsz);

}
#endif


